package coasttocoast.client.swing.controls;

import javax.swing.*;
import java.awt.*;

/**
 * @author gsh
 */
public class GamePanel extends JPanel {
  public GamePanel() {
    super(new BorderLayout());
    addComponents();
  }

  private void addComponents() {
    MapPanel map = new MapPanel();
    JScrollPane mapScrollPane = new JScrollPane(map);

    ControlPanel controls = new ControlPanel();
    JScrollPane controlScrollPane = new JScrollPane(controls);

    JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, mapScrollPane,
        controlScrollPane);
    splitPane.setOneTouchExpandable(true);
    splitPane.setDividerLocation(425);
    add(splitPane, BorderLayout.CENTER);

    setPreferredSize(new Dimension(600, 600));
  }
}
